package cn.bdqn.service.impl;

import cn.bdqn.domain.User;
import cn.bdqn.mapper.UserMapper;
import cn.bdqn.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author 周安康
 * @create 2020/10/3 10:20
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;


    @Override
    public User queryUserByOpenID(String openid) {
        return userMapper.findUserByOpenID(openid);
    }

    @Override
    public void saveUser(User user) {
        userMapper.insertUser(user);
    }

    @Override
    public int addUser(User user) {
        return userMapper.addUser(user);
    }

    @Override
    public Integer selectStatusByOpenId(String openid) {
        return userMapper.selectStatusByOpenId(openid);
    }

    @Override
    public int updateUserByOpenId(User user) {
        return userMapper.updateUserByOpenId(user);
    }
}
